package cn.wzptsoft.mall.pojo.vo;

import cn.wzptsoft.mall.pojo.Category;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class CategoryInfoVo {
    private Integer id;
    private String name;
    private String description;
    private Boolean isRoot;
    private String img;
    private Integer parentId;
    private Integer sort;

    public CategoryInfoVo(Category category){
        this.id=category.getId();
        this.name=category.getName();
        this.description=category.getDescription();
        this.isRoot=category.getIsRoot();
        this.img=category.getImg();
        this.parentId=category.getParentId();
        this.sort=category.getSort();
    }

}